const express = require('express');
const router = express.Router();


router.use('/student', require('./student/grade.routes'));

// 聚合所有子路由
router.use('/tourist', require('./tourist/experiment.routes'));
router.use('/auth', require('./auth/auth.routes'));

router.use('/student', require('./student/experiment.routes'));
router.use('/student', require('./student/submission.routes'));
// router.use('/student', require('./student/discussion.routes'));
router.use('/teacher', require('./teacher/class.routes'));
router.use('/teacher', require('./teacher/experiment.routes'));
router.use('/teacher', require('./teacher/grade.routes'));
// router.use('/teacher', require('./teacher/report.routes'));
// router.use('/admin', require('./admin/user.routes'));
// router.use('/admin', require('./admin/system.routes'));
// router.use('/admin', require('./admin/plagiarism.routes'));
// router.use('/common', require('./common/file.routes'));

// 添加调试路由
router.get('/debug', (req, res) => {
  console.log('调试路由被访问');
  res.json({ message: '调试路由工作正常' });
});

router.use((req, res, next) => {
  console.log('请求路径:', req.originalUrl); // 打印实际访问路径
  next();
});
module.exports = router;